package com.gouying.web.feign;

import com.gouying.common.utils.R;
import com.gouying.web.vo.SocialUser;
import com.gouying.web.vo.UserLoginVo;
import com.gouying.web.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author ly
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 会员注册
     *
     * @param vo
     * @return
     */
    @PostMapping("/member/member/regist")
    R regist(@RequestBody UserRegistVo vo);

    /**
     * 会员登录
     *
     * @param vo
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    /**
     * 社交登录
     *
     * @param socialUser
     * @return
     */
    @PostMapping("/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser);
}
